<template>
  <div class="massage_container" v-show="visible">
    <div class="massage_wrapper">
      <div class="massage_content">
        <div style="width:100%;height:50px;text-align:center;">
          <h2>{{ title }}</h2>
        </div>
        <div style="width:100%; padding-left:20px; ">{{ massage }}</div>
        <div class="massage_button">
          <button @click="onclick">取消</button><button>确定</button>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      title: "",
      massage: "",
      visible: false,
    };
  },
  methods: {
    onclick() {
      this.visible = false;
    },
  },
};
</script>

<style scoped>
.massage_container {
  width: 100vw;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}
.massage_wrapper {
  width: 100%;
  height: 100%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}
.massage_content {
  width: 75%;
  height: 200px;
  background: white;
  border-radius: 10px;
  display: inline-flex;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
}
.massage_button {
  width: 100%;
  margin-top: 20px;
  display: inline-flex;
  justify-content: space-around;
  align-items: center;
}
.massage_button button {
  width: 50px;
  height: 30px;
  border: none;
  border-radius: 5px;
  background: skyblue;
  outline: none;
}
</style>
